package com.jintoufs.service.org;

import com.jintoufs.domain.org.Org;
import com.jintoufs.util.ztree.TreeNode;
import org.cosmos.modules.web.msg.AjaxMsg;

import java.util.List;
import java.util.Map;

/**
 * 组织架构的业务逻辑
 */
public interface OrgService {

    /**
     * 增加网点
     *
     * @param entity
     * @param ajaxMsg
     * @return
     */
    Org add(Org entity, AjaxMsg ajaxMsg);

    /**
     * 更新网点
     *
     * @param entity
     * @param ajaxMsg
     * @return
     */
    void update(Org entity, AjaxMsg ajaxMsg);

    /**
     * 机构树
     *
     * @return
     */
    List<TreeNode> getOrgMenu(Org entity, int level, boolean ifParentCheck);

    List<Org> queryByParams(Map<String, Object> params);

    Org getById(int id);

    void deleteById(Integer id, AjaxMsg ajaxMsg);
}
